using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using ActiproSoftware.SyntaxEditor;
using ActiproSoftware.SyntaxEditor.Addons.Xml;
using ComponentFactory.Krypton.Docking;
using ComponentFactory.Krypton.Navigator;
using ComponentFactory.Krypton.Ribbon;
using ComponentFactory.Krypton.Toolkit;
using ComponentFactory.Krypton.Workspace;
using DukeyCssFetch.api;
using DukeyCssFetch.Properties;
using DukeyCssFetch.UI;
using HtmlAgilityPack;

namespace DukeyCssFetch
{
	// Token: 0x02000009 RID: 9
	public class Editor2 : KryptonForm
	{
		// Token: 0x0600003A RID: 58 RVA: 0x00008208 File Offset: 0x00006408
		public Editor2()
		{
			this.KpgFralFoe = 1;
			this.findReplaceOptions_0 = new FindReplaceOptions();
			this.string_0 = "";
			
			this.InitializeComponent();
			MiddleModule.eventSend += new Send(this.method_16);
			this.Text = "当前标签面板为:" + Comm.CurrentTag;
		}

		// Token: 0x0600004E RID: 78 RVA: 0x0000867C File Offset: 0x0000687C
		public void AddFileToEditor(string path)
		{
			if (this.kryptonWorkspaceCell_0 == null)
			{
				this.kryptonWorkspaceCell_0 = new KryptonWorkspaceCell();
			}
			if (!File.Exists(path))
			{
				MessageBox.Show("该文件已经被移除!");
				return;
			}
			foreach (KryptonPage current in this.kryptonWorkspaceCell_0.Pages)
			{
				if (string.Equals(current.Tag.ToString(), path))
				{
					this.kryptonWorkspaceCell_0.SelectedPage = current;
					return;
				}
			}
			KryptonPage kryptonPage = new KryptonPage();
			FileInfo fileInfo = new FileInfo(path);
			string name = fileInfo.Name;
			kryptonPage.Text = name;
			kryptonPage.ToolTipTitle = path;
			kryptonPage.ToolTipBody = path;
			kryptonPage.Tag = path;
			SyntaxEditor syntaxEditor = new SyntaxEditor();
			syntaxEditor.Margin = new Padding(0);
			syntaxEditor.Padding = new Padding(0);
			syntaxEditor.Dock = DockStyle.Fill;
			XmlSyntaxLanguage language = new XmlSyntaxLanguage();
			syntaxEditor.Document.Language = language;
			syntaxEditor.Location = new Point(0, 0);
			syntaxEditor.LineNumberMarginWidth = 2;
			syntaxEditor.CurrentLineHighlightingVisible = true;
			XmlSchemaResolver languageData = new XmlSchemaResolver();
			syntaxEditor.Document.LanguageData = languageData;
			syntaxEditor.Document.Outlining.Mode = OutliningMode.Automatic;
			syntaxEditor.LineNumberMarginVisible = true;
			syntaxEditor.Document.UndoRedoStateChanged += new UndoRedoStateChangedEventHandler(this.method_14);
			syntaxEditor.WordWrap = WordWrapType.Word;
			kryptonPage.Controls.Add(syntaxEditor);
			ButtonSpecAny buttonSpecAny = new ButtonSpecAny();
			buttonSpecAny.Type = PaletteButtonSpecStyle.Close;
			buttonSpecAny.Click += new EventHandler(this.method_13);
			kryptonPage.ButtonSpecs.AddRange(new ButtonSpecAny[]
			{
				buttonSpecAny
			});
			this.kryptonWorkspaceCell_0.Pages.AddRange(new KryptonPage[]
			{
				kryptonPage
			});
			this.kryptonWorkspaceCell_0.SelectedPage = kryptonPage;
			this.kryptonWorkspaceCell_0.Button.CloseButtonDisplay = ButtonDisplay.Hide;
			this.kryptonWorkspaceCell_0.Button.ButtonDisplayLogic = ButtonDisplayLogic.ContextNextPrevious;
			DukeyEncode dukeyEncode = new DukeyEncode();
			Encoding encoding = dukeyEncode.GetEncoding(dukeyEncode.GetEncodingName(new FileInfo(path)));
			syntaxEditor.Tag = encoding;
			syntaxEditor.Document.LoadFile(path, encoding);
			syntaxEditor.Focus();
			this.kryptonDockableWorkspace.Root.Children.Clear();
			this.kryptonDockableWorkspace.Root.Children.Add(this.kryptonWorkspaceCell_0);
		}

		// Token: 0x0600004C RID: 76 RVA: 0x000085E4 File Offset: 0x000067E4
		private void aMnarujUlO_Click(object sender, EventArgs e)
		{
			if (this.folderBrowserDialog_0.ShowDialog() == DialogResult.OK)
			{
				MiddleModule.SendMessage(this, new FormInfo
				{
					frmname = "addfolder",
					para = this.folderBrowserDialog_0.SelectedPath
				});
			}
		}

		// Token: 0x0600005A RID: 90 RVA: 0x00008DBC File Offset: 0x00006FBC
		private void cmenu_optionItem_autowrap_Click(object sender, EventArgs e)
		{
			if (this.kryptonWorkspaceCell_0 != null && this.kryptonWorkspaceCell_0.Pages.Count > 0)
			{
				foreach (KryptonPage current in this.kryptonWorkspaceCell_0.Pages)
				{
					SyntaxEditor syntaxEditor = current.Controls[0] as SyntaxEditor;
					if (this.cmenu_optionItem_autowrap.Checked)
					{
						syntaxEditor.WordWrap = WordWrapType.None;
					}
					else
					{
						syntaxEditor.WordWrap = WordWrapType.Word;
					}
				}
			}
			this.cmenu_optionItem_autowrap.Checked = !this.cmenu_optionItem_autowrap.Checked;
		}

		// Token: 0x0600005C RID: 92 RVA: 0x00008F1C File Offset: 0x0000711C
		private void cmenu_optionItem_RowHighlighter_Click(object sender, EventArgs e)
		{
			if (this.kryptonWorkspaceCell_0 != null && this.kryptonWorkspaceCell_0.Pages.Count > 0)
			{
				foreach (KryptonPage current in this.kryptonWorkspaceCell_0.Pages)
				{
					SyntaxEditor syntaxEditor = current.Controls[0] as SyntaxEditor;
					if (this.cmenu_optionItem_RowHighlighter.Checked)
					{
						syntaxEditor.CurrentLineHighlightingVisible = false;
					}
					else
					{
						syntaxEditor.CurrentLineHighlightingVisible = true;
					}
				}
			}
			this.cmenu_optionItem_RowHighlighter.Checked = !this.cmenu_optionItem_RowHighlighter.Checked;
		}

		// Token: 0x0600005B RID: 91 RVA: 0x00008E6C File Offset: 0x0000706C
		private void cmenu_optionItem_ShowLineNumber_Click(object sender, EventArgs e)
		{
			if (this.kryptonWorkspaceCell_0 != null && this.kryptonWorkspaceCell_0.Pages.Count > 0)
			{
				foreach (KryptonPage current in this.kryptonWorkspaceCell_0.Pages)
				{
					SyntaxEditor syntaxEditor = current.Controls[0] as SyntaxEditor;
					if (this.cmenu_optionItem_ShowLineNumber.Checked)
					{
						syntaxEditor.LineNumberMarginVisible = false;
					}
					else
					{
						syntaxEditor.LineNumberMarginVisible = true;
					}
				}
			}
			this.cmenu_optionItem_ShowLineNumber.Checked = !this.cmenu_optionItem_ShowLineNumber.Checked;
		}

		// Token: 0x06000038 RID: 56 RVA: 0x00006D10 File Offset: 0x00004F10
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.icontainer_0 != null)
			{
				this.icontainer_0.Dispose();
			}
			base.Dispose(disposing);
		}

		// Token: 0x06000063 RID: 99 RVA: 0x0000924C File Offset: 0x0000744C
		private void Editor2_FormClosed(object sender, FormClosedEventArgs e)
		{
		}

		// Token: 0x06000064 RID: 100 RVA: 0x00009250 File Offset: 0x00007450
		private void Editor2_FormClosing(object sender, FormClosingEventArgs e)
		{
			base.Hide();
			e.Cancel = true;
		}

		// Token: 0x0600003F RID: 63 RVA: 0x00008388 File Offset: 0x00006588
		private void Editor2_Load(object sender, EventArgs e)
		{
			KryptonDockingWorkspace workspace = this.kryptonDockingManager_0.ManageWorkspace(this.kryptonDockableWorkspace);
			this.kryptonDockingManager_0.ManageControl(this.kryptonPanel, workspace);
			this.kryptonDockingManager_0.ManageFloating(this);
			KryptonPage kryptonPage = this.method_3("标签面板");
			kryptonPage.UniqueName = "tagexploer";
			this.kryptonDockingManager_0.AddDockspace("Control", DockingEdge.Left, new KryptonPage[]
			{
				kryptonPage
			}, new KryptonPage[0][]);
			this.kryptonDockingManager_0.AddDockspace("Control", DockingEdge.Right, new KryptonPage[]
			{
				this.method_1("资源管理器")
			}, new KryptonPage[0][]);
		}

		// Token: 0x06000049 RID: 73 RVA: 0x00008558 File Offset: 0x00006758
		private void elSmwyIeZa(object sender, DockPageSavingEventArgs e)
		{
			e.XmlWriter.WriteStartElement("CustomPageData");
			e.XmlWriter.WriteAttributeString("SavedMilliseconds", DateTime.Now.Millisecond.ToString());
			e.XmlWriter.WriteEndElement();
		}

		// Token: 0x06000039 RID: 57 RVA: 0x00006D30 File Offset: 0x00004F30
		private void InitializeComponent()
		{
			this.icontainer_0 = new Container();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Editor2));
			this.kryptonDockingManager_0 = new KryptonDockingManager();
			this.imageList_0 = new ImageList(this.icontainer_0);
			this.kryptonRibbon = new KryptonRibbon();
			this.aMnarujUlO = new KryptonContextMenuItem();
			this.kryptonContextMenuItem_1 = new KryptonContextMenuItem();
			this.kryptonContextMenuItem_0 = new KryptonContextMenuItem();
			this.kryptonRibbonTab_0 = new KryptonRibbonTab();
			this.kryptonRibbonGroup_0 = new KryptonRibbonGroup();
			this.kryptonRibbonGroupTriple_0 = new KryptonRibbonGroupTriple();
			this.kryptonRibbonGroupButton_0 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_1 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_2 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroup_1 = new KryptonRibbonGroup();
			this.kryptonRibbonGroupTriple_1 = new KryptonRibbonGroupTriple();
			this.kryptonRibbonGroupButton_3 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_4 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_5 = new KryptonRibbonGroupButton();
			this.contextMenuStrip1 = new ContextMenuStrip(this.icontainer_0);
			this.cmenu_optionItem_autowrap = new ToolStripMenuItem();
			this.cmenu_optionItem_ShowLineNumber = new ToolStripMenuItem();
			this.cmenu_optionItem_RowHighlighter = new ToolStripMenuItem();
			this.代码折叠ToolStripMenuItem = new ToolStripMenuItem();
			this.kryptonRibbonGroup_2 = new KryptonRibbonGroup();
			this.kryptonRibbonGroupTriple_2 = new KryptonRibbonGroupTriple();
			this.kryptonRibbonGroupButton_6 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_7 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_8 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroup_3 = new KryptonRibbonGroup();
			this.kryptonRibbonGroupTriple_3 = new KryptonRibbonGroupTriple();
			this.kryptonRibbonGroupButton_9 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_10 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_11 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupSeparator_0 = new KryptonRibbonGroupSeparator();
			this.kryptonRibbonGroupTriple_5 = new KryptonRibbonGroupTriple();
			this.kryptonRibbonGroupButton_14 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_15 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_16 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroup_4 = new KryptonRibbonGroup();
			this.kryptonRibbonGroupTriple_4 = new KryptonRibbonGroupTriple();
			this.kryptonRibbonGroupButton_12 = new KryptonRibbonGroupButton();
			this.kryptonRibbonGroupButton_13 = new KryptonRibbonGroupButton();
			this.kryptonContextMenu_0 = new KryptonContextMenu();
			this.kryptonContextMenuItems_1 = new KryptonContextMenuItems();
			this.kryptonContextMenuCheckButton_1 = new KryptonContextMenuCheckButton();
			this.kryptonContextMenuCheckButton_2 = new KryptonContextMenuCheckButton();
			this.kryptonContextMenuCheckButton_3 = new KryptonContextMenuCheckButton();
			this.kryptonContextMenuHeading_1 = new KryptonContextMenuHeading();
			this.kryptonContextMenuItems_5 = new KryptonContextMenuItems();
			this.kryptonContextMenuItem_9 = new KryptonContextMenuItem();
			this.kryptonContextMenuItem_10 = new KryptonContextMenuItem();
			this.openFileDialog_0 = new OpenFileDialog();
			this.saveFileDialog_0 = new SaveFileDialog();
			this.kryptonManager_0 = new KryptonManager(this.icontainer_0);
			this.kryptonPanel = new KryptonPanel();
			this.kryptonDockableWorkspace = new KryptonDockableWorkspace();
			this.kryptonContextMenuItems_0 = new KryptonContextMenuItems();
			this.kryptonContextMenuItem_2 = new KryptonContextMenuItem();
			this.kryptonContextMenuItem_3 = new KryptonContextMenuItem();
			this.kryptonContextMenuHeading_0 = new KryptonContextMenuHeading();
			this.kryptonContextMenuItem_4 = new KryptonContextMenuItem();
			this.kryptonContextMenuCheckButton_0 = new KryptonContextMenuCheckButton();
			this.kryptonContextMenuItem_5 = new KryptonContextMenuItem();
			this.kryptonContextMenuCheckBox_0 = new KryptonContextMenuCheckBox();
			this.kryptonContextMenuItem_6 = new KryptonContextMenuItem();
			this.kryptonContextMenuItems_2 = new KryptonContextMenuItems();
			this.kryptonContextMenuItems_3 = new KryptonContextMenuItems();
			this.kryptonContextMenuItem_7 = new KryptonContextMenuItem();
			this.kryptonContextMenuItems_4 = new KryptonContextMenuItems();
			this.kryptonContextMenuItem_8 = new KryptonContextMenuItem();
			this.folderBrowserDialog_0 = new FolderBrowserDialog();
			this.fontDialog_0 = new FontDialog();
			this.kryptonManager_1 = new KryptonManager(this.icontainer_0);
			((ISupportInitialize)this.kryptonRibbon).BeginInit();
			this.contextMenuStrip1.SuspendLayout();
			((ISupportInitialize)this.kryptonPanel).BeginInit();
			this.kryptonPanel.SuspendLayout();
			((ISupportInitialize)this.kryptonDockableWorkspace).BeginInit();
			base.SuspendLayout();
			this.kryptonDockingManager_0.GlobalSaving += new EventHandler<DockGlobalSavingEventArgs>(this.method_10);
			this.kryptonDockingManager_0.GlobalLoading += new EventHandler<DockGlobalLoadingEventArgs>(this.method_11);
			this.kryptonDockingManager_0.PageSaving += new EventHandler<DockPageSavingEventArgs>(this.elSmwyIeZa);
			this.kryptonDockingManager_0.PageLoading += new EventHandler<DockPageLoadingEventArgs>(this.method_12);
			this.imageList_0.ImageStream = (ImageListStreamer)componentResourceManager.GetObject("imageListSmall.ImageStream");
			this.imageList_0.TransparentColor = Color.Transparent;
			this.imageList_0.Images.SetKeyName(0, "save1.png");
			this.kryptonRibbon.InDesignHelperMode = false;
			this.kryptonRibbon.Name = "kryptonRibbon";
			this.kryptonRibbon.RibbonAppButton.AppButtonImage = Resources.smethod_5();
			this.kryptonRibbon.RibbonAppButton.AppButtonMenuItems.AddRange(new KryptonContextMenuItemBase[]
			{
				this.aMnarujUlO,
				this.kryptonContextMenuItem_1,
				this.kryptonContextMenuItem_0
			});
			this.kryptonRibbon.RibbonTabs.AddRange(new KryptonRibbonTab[]
			{
				this.kryptonRibbonTab_0
			});
			this.kryptonRibbon.SelectedTab = this.kryptonRibbonTab_0;
			this.kryptonRibbon.Size = new Size(984, 115);
			this.kryptonRibbon.TabIndex = 0;
			this.aMnarujUlO.Image = (Image)componentResourceManager.GetObject("menuitem_Openfolder.Image");
			this.aMnarujUlO.Text = "打开文件夹";
			this.aMnarujUlO.Click += new EventHandler(this.aMnarujUlO_Click);
			this.kryptonContextMenuItem_1.Image = (Image)componentResourceManager.GetObject("menuitem_Save.Image");
			this.kryptonContextMenuItem_1.Text = "保存(&S)";
			this.kryptonContextMenuItem_1.Click += new EventHandler(this.kryptonRibbonGroupButton_1_Click);
			this.kryptonContextMenuItem_0.Image = (Image)componentResourceManager.GetObject("kryptonContextMenuItem1.Image");
			this.kryptonContextMenuItem_0.Text = "退出(E&xit)";
			this.kryptonContextMenuItem_0.Click += new EventHandler(this.kryptonContextMenuItem_0_Click);
			this.kryptonRibbonTab_0.Groups.AddRange(new KryptonRibbonGroup[]
			{
				this.kryptonRibbonGroup_0,
				this.kryptonRibbonGroup_1,
				this.kryptonRibbonGroup_2,
				this.kryptonRibbonGroup_3,
				this.kryptonRibbonGroup_4
			});
			this.kryptonRibbonTab_0.Text = "选项";
			this.kryptonRibbonGroup_0.DialogBoxLauncher = false;
			this.kryptonRibbonGroup_0.Image = (Image)componentResourceManager.GetObject("kryptonRibbonGroup2.Image");
			this.kryptonRibbonGroup_0.Items.AddRange(new KryptonRibbonGroupContainer[]
			{
				this.kryptonRibbonGroupTriple_0
			});
			this.kryptonRibbonGroup_0.TextLine1 = "基本操作";
			this.kryptonRibbonGroupTriple_0.ItemAlignment = RibbonItemAlignment.Center;
			this.kryptonRibbonGroupTriple_0.Items.AddRange(new KryptonRibbonGroupItem[]
			{
				this.kryptonRibbonGroupButton_0,
				this.kryptonRibbonGroupButton_1,
				this.kryptonRibbonGroupButton_2
			});
			this.kryptonRibbonGroupTriple_0.MinimumSize = GroupItemSize.Large;
			this.kryptonRibbonGroupButton_0.ImageLarge = Resources.smethod_1();
			this.kryptonRibbonGroupButton_0.ImageSmall = (Image)componentResourceManager.GetObject("buttonLoadFile.ImageSmall");
			this.kryptonRibbonGroupButton_0.KeyTip = "CTRL+O";
			this.kryptonRibbonGroupButton_0.TextLine1 = "打开";
			this.kryptonRibbonGroupButton_0.Click += new EventHandler(this.kryptonRibbonGroupButton_0_Click);
			this.kryptonRibbonGroupButton_1.ImageLarge = Resources.smethod_11();
			this.kryptonRibbonGroupButton_1.ImageSmall = Resources.smethod_11();
			this.kryptonRibbonGroupButton_1.KeyTip = "CTRL+S";
			this.kryptonRibbonGroupButton_1.ShortcutKeys = (Keys)131155;
			this.kryptonRibbonGroupButton_1.TextLine1 = "保存";
			this.kryptonRibbonGroupButton_1.ToolTipTitle = "Ctrl+S";
			this.kryptonRibbonGroupButton_1.Click += new EventHandler(this.kryptonRibbonGroupButton_1_Click);
			this.kryptonRibbonGroupButton_2.ImageLarge = Resources.smethod_13();
			this.kryptonRibbonGroupButton_2.ImageSmall = Resources.smethod_13();
			this.kryptonRibbonGroupButton_2.KeyTip = "CTRL+SHIFT+S";
			this.kryptonRibbonGroupButton_2.ShortcutKeys = (Keys)196691;
			this.kryptonRibbonGroupButton_2.TextLine1 = "保存全部";
			this.kryptonRibbonGroupButton_2.ToolTipTitle = "Ctrl+Shift+S";
			this.kryptonRibbonGroupButton_2.Click += new EventHandler(this.kryptonRibbonGroupButton_2_Click);
			this.kryptonRibbonGroup_1.DialogBoxLauncher = false;
			this.kryptonRibbonGroup_1.Image = (Image)componentResourceManager.GetObject("kryptonRibbonGroup3.Image");
			this.kryptonRibbonGroup_1.Items.AddRange(new KryptonRibbonGroupContainer[]
			{
				this.kryptonRibbonGroupTriple_1
			});
			this.kryptonRibbonGroup_1.TextLine1 = "编辑器设置";
			this.kryptonRibbonGroupTriple_1.Items.AddRange(new KryptonRibbonGroupItem[]
			{
				this.kryptonRibbonGroupButton_3,
				this.kryptonRibbonGroupButton_4,
				this.kryptonRibbonGroupButton_5
			});
			this.kryptonRibbonGroupButton_3.ImageLarge = Resources.smethod_3();
			this.kryptonRibbonGroupButton_3.ImageSmall = Resources.smethod_3();
			this.kryptonRibbonGroupButton_3.TextLine1 = "字体";
			this.kryptonRibbonGroupButton_3.Click += new EventHandler(this.kryptonRibbonGroupButton_3_Click);
			this.kryptonRibbonGroupButton_4.ButtonType = GroupButtonType.DropDown;
			this.kryptonRibbonGroupButton_4.ImageLarge = Resources.smethod_0();
			this.kryptonRibbonGroupButton_4.ImageSmall = Resources.smethod_0();
			this.kryptonRibbonGroupButton_4.TextLine1 = "配色";
			this.kryptonRibbonGroupButton_4.Click += new EventHandler(this.PbSaofvZj0);
			this.kryptonRibbonGroupButton_5.ButtonType = GroupButtonType.DropDown;
			this.kryptonRibbonGroupButton_5.ContextMenuStrip = this.contextMenuStrip1;
			this.kryptonRibbonGroupButton_5.ImageLarge = Resources.smethod_7();
			this.kryptonRibbonGroupButton_5.ImageSmall = Resources.smethod_7();
			this.kryptonRibbonGroupButton_5.KeyTip = "OPTION";
			this.kryptonRibbonGroupButton_5.TextLine1 = "选项";
			this.kryptonRibbonGroupButton_5.Click += new EventHandler(this.kryptonRibbonGroupButton_5_Click);
			this.contextMenuStrip1.Font = new Font("Segoe UI", 9f);
			this.contextMenuStrip1.Items.AddRange(new ToolStripItem[]
			{
				this.cmenu_optionItem_autowrap,
				this.cmenu_optionItem_ShowLineNumber,
				this.cmenu_optionItem_RowHighlighter,
				this.代码折叠ToolStripMenuItem
			});
			this.contextMenuStrip1.Name = "contextMenuStrip1";
			this.contextMenuStrip1.Size = new Size(152, 92);
			this.cmenu_optionItem_autowrap.Checked = true;
			this.cmenu_optionItem_autowrap.CheckState = CheckState.Checked;
			this.cmenu_optionItem_autowrap.Name = "cmenu_optionItem_autowrap";
			this.cmenu_optionItem_autowrap.Size = new Size(151, 22);
			this.cmenu_optionItem_autowrap.Text = "自动换行";
			this.cmenu_optionItem_autowrap.Click += new EventHandler(this.cmenu_optionItem_autowrap_Click);
			this.cmenu_optionItem_ShowLineNumber.Checked = true;
			this.cmenu_optionItem_ShowLineNumber.CheckState = CheckState.Checked;
			this.cmenu_optionItem_ShowLineNumber.Name = "cmenu_optionItem_ShowLineNumber";
			this.cmenu_optionItem_ShowLineNumber.Size = new Size(151, 22);
			this.cmenu_optionItem_ShowLineNumber.Text = "显示行号";
			this.cmenu_optionItem_ShowLineNumber.Click += new EventHandler(this.cmenu_optionItem_ShowLineNumber_Click);
			this.cmenu_optionItem_RowHighlighter.Checked = true;
			this.cmenu_optionItem_RowHighlighter.CheckState = CheckState.Checked;
			this.cmenu_optionItem_RowHighlighter.Name = "cmenu_optionItem_RowHighlighter";
			this.cmenu_optionItem_RowHighlighter.Size = new Size(151, 22);
			this.cmenu_optionItem_RowHighlighter.Text = "选中行高亮";
			this.cmenu_optionItem_RowHighlighter.Click += new EventHandler(this.cmenu_optionItem_RowHighlighter_Click);
			this.代码折叠ToolStripMenuItem.Name = "代码折叠ToolStripMenuItem";
			this.代码折叠ToolStripMenuItem.Size = new Size(151, 22);
			this.代码折叠ToolStripMenuItem.Text = "代码折叠/展开";
			this.代码折叠ToolStripMenuItem.Click += new EventHandler(this.代码折叠ToolStripMenuItem_Click);
			this.kryptonRibbonGroup_2.AllowCollapsed = false;
			this.kryptonRibbonGroup_2.DialogBoxLauncher = false;
			this.kryptonRibbonGroup_2.Items.AddRange(new KryptonRibbonGroupContainer[]
			{
				this.kryptonRibbonGroupTriple_2
			});
			this.kryptonRibbonGroup_2.TextLine1 = "其他功能";
			this.kryptonRibbonGroupTriple_2.Items.AddRange(new KryptonRibbonGroupItem[]
			{
				this.kryptonRibbonGroupButton_6,
				this.kryptonRibbonGroupButton_7,
				this.kryptonRibbonGroupButton_8
			});
			this.kryptonRibbonGroupButton_6.ImageLarge = Resources.smethod_4();
			this.kryptonRibbonGroupButton_6.ImageSmall = Resources.smethod_4();
			this.kryptonRibbonGroupButton_6.TextLine1 = "一键排版";
			this.kryptonRibbonGroupButton_6.Click += new EventHandler(this.kryptonRibbonGroupButton_6_Click);
			this.kryptonRibbonGroupButton_7.ImageLarge = Resources.smethod_14();
			this.kryptonRibbonGroupButton_7.ImageSmall = Resources.smethod_14();
			this.kryptonRibbonGroupButton_7.TextLine1 = "查找";
			this.kryptonRibbonGroupButton_7.Click += new EventHandler(this.kryptonRibbonGroupButton_7_Click);
			this.kryptonRibbonGroupButton_8.ImageLarge = Resources.smethod_10();
			this.kryptonRibbonGroupButton_8.ImageSmall = Resources.smethod_10();
			this.kryptonRibbonGroupButton_8.TextLine1 = "替换";
			this.kryptonRibbonGroupButton_8.Click += new EventHandler(this.kryptonRibbonGroupButton_8_Click);
			this.kryptonRibbonGroup_3.DialogBoxLauncher = false;
			this.kryptonRibbonGroup_3.Items.AddRange(new KryptonRibbonGroupContainer[]
			{
				this.kryptonRibbonGroupTriple_3,
				this.kryptonRibbonGroupSeparator_0,
				this.kryptonRibbonGroupTriple_5
			});
			this.kryptonRibbonGroup_3.TextLine1 = "其他";
			this.kryptonRibbonGroupTriple_3.Items.AddRange(new KryptonRibbonGroupItem[]
			{
				this.kryptonRibbonGroupButton_9,
				this.kryptonRibbonGroupButton_10,
				this.kryptonRibbonGroupButton_11
			});
			this.kryptonRibbonGroupButton_9.Enabled = false;
			this.kryptonRibbonGroupButton_9.ImageLarge = Resources.smethod_15();
			this.kryptonRibbonGroupButton_9.ImageSmall = Resources.smethod_15();
			this.kryptonRibbonGroupButton_9.ShortcutKeys = (Keys)131162;
			this.kryptonRibbonGroupButton_9.TextLine1 = "撤销";
			this.kryptonRibbonGroupButton_9.Click += new EventHandler(this.kryptonRibbonGroupButton_9_Click);
			this.kryptonRibbonGroupButton_10.Enabled = false;
			this.kryptonRibbonGroupButton_10.ImageLarge = Resources.smethod_9();
			this.kryptonRibbonGroupButton_10.ImageSmall = Resources.smethod_9();
			this.kryptonRibbonGroupButton_10.ShortcutKeys = (Keys)131161;
			this.kryptonRibbonGroupButton_10.TextLine1 = "重做";
			this.kryptonRibbonGroupButton_10.Click += new EventHandler(this.kryptonRibbonGroupButton_10_Click);
			this.kryptonRibbonGroupButton_11.ImageLarge = Resources.smethod_2();
			this.kryptonRibbonGroupButton_11.ImageSmall = Resources.smethod_2();
			this.kryptonRibbonGroupButton_11.TextLine1 = "打开文件夹";
			this.kryptonRibbonGroupButton_11.Click += new EventHandler(this.kryptonRibbonGroupButton_11_Click);
			this.kryptonRibbonGroupTriple_5.Items.AddRange(new KryptonRibbonGroupItem[]
			{
				this.kryptonRibbonGroupButton_14,
				this.kryptonRibbonGroupButton_15,
				this.kryptonRibbonGroupButton_16
			});
			this.kryptonRibbonGroupButton_14.ImageLarge = Resources.tag;
			this.kryptonRibbonGroupButton_14.TextLine1 = "切换标签";
			this.kryptonRibbonGroupButton_14.Click += new EventHandler(this.kryptonRibbonGroupButton_14_Click);
			this.kryptonRibbonGroupButton_15.ImageLarge = Resources.CyoNfXyJrY();
			this.kryptonRibbonGroupButton_15.TextLine1 = "编辑标签";
			this.kryptonRibbonGroupButton_15.Click += new EventHandler(this.kryptonRibbonGroupButton_15_Click);
			this.kryptonRibbonGroupButton_16.ImageLarge = Resources.smethod_6();
			this.kryptonRibbonGroupButton_16.TextLine1 = "新建标签";
			this.kryptonRibbonGroupButton_16.Click += new EventHandler(this.kryptonRibbonGroupButton_16_Click);
			this.kryptonRibbonGroup_4.Items.AddRange(new KryptonRibbonGroupContainer[]
			{
				this.kryptonRibbonGroupTriple_4
			});
			this.kryptonRibbonGroup_4.TextLine1 = "编码转换";
			this.kryptonRibbonGroupTriple_4.Items.AddRange(new KryptonRibbonGroupItem[]
			{
				this.kryptonRibbonGroupButton_12,
				this.kryptonRibbonGroupButton_13
			});
			this.kryptonRibbonGroupButton_12.ImageLarge = Resources.smethod_16();
			this.kryptonRibbonGroupButton_12.TextLine1 = "UTF-8";
			this.kryptonRibbonGroupButton_12.Click += new EventHandler(this.kryptonRibbonGroupButton_12_Click);
			this.kryptonRibbonGroupButton_13.ImageLarge = Resources.gb2312;
			this.kryptonRibbonGroupButton_13.TextLine1 = "GBK";
			this.kryptonRibbonGroupButton_13.Click += new EventHandler(this.kryptonRibbonGroupButton_13_Click);
			this.kryptonContextMenu_0.Items.AddRange(new KryptonContextMenuItemBase[]
			{
				this.kryptonContextMenuItems_1,
				this.kryptonContextMenuCheckButton_1,
				this.kryptonContextMenuCheckButton_2,
				this.kryptonContextMenuCheckButton_3,
				this.kryptonContextMenuHeading_1,
				this.kryptonContextMenuItems_5
			});
			this.kryptonContextMenuCheckButton_1.Text = "自动换行";
			this.kryptonContextMenuCheckButton_2.Text = "显示行号";
			this.kryptonContextMenuCheckButton_3.Text = "选中行高亮";
			this.kryptonContextMenuHeading_1.ExtraText = "";
			this.kryptonContextMenuHeading_1.Text = "代码折叠";
			this.kryptonContextMenuItems_5.Items.AddRange(new KryptonContextMenuItemBase[]
			{
				this.kryptonContextMenuItem_9,
				this.kryptonContextMenuItem_10
			});
			this.kryptonContextMenuItem_9.Text = "全部折叠";
			this.kryptonContextMenuItem_10.Text = "全部展开";
			this.openFileDialog_0.DefaultExt = "html";
			this.openFileDialog_0.Filter = "All Files (*.*)|*.*|网页文件|*.html;*.htm|样式文件|*.css|js文件|*.js";
			this.saveFileDialog_0.DefaultExt = "xml";
			this.saveFileDialog_0.FileName = "Config.xml";
			this.saveFileDialog_0.Filter = "Xml Files|*.xml|All Files|*.*";
			this.saveFileDialog_0.InitialDirectory = "c:\\";
			this.kryptonManager_0.GlobalPaletteMode = PaletteModeManager.Office2007Blue;
			this.kryptonPanel.Controls.Add(this.kryptonDockableWorkspace);
			this.kryptonPanel.Dock = DockStyle.Fill;
			this.kryptonPanel.Location = new Point(0, 115);
			this.kryptonPanel.Name = "kryptonPanel";
			this.kryptonPanel.Padding = new Padding(3);
			this.kryptonPanel.Size = new Size(984, 447);
			this.kryptonPanel.TabIndex = 2;
			this.kryptonDockableWorkspace.AutoHiddenHost = false;
			this.kryptonDockableWorkspace.CompactFlags = (CompactFlags.RemoveEmptyCells | CompactFlags.RemoveEmptySequences | CompactFlags.PromoteLeafs);
			this.kryptonDockableWorkspace.Dock = DockStyle.Fill;
			this.kryptonDockableWorkspace.Location = new Point(3, 3);
			this.kryptonDockableWorkspace.Name = "kryptonDockableWorkspace";
			this.kryptonDockableWorkspace.Root.UniqueName = "5462F66039D342065462F66039D34206";
			this.kryptonDockableWorkspace.Root.WorkspaceControl = this.kryptonDockableWorkspace;
			this.kryptonDockableWorkspace.ShowMaximizeButton = false;
			this.kryptonDockableWorkspace.Size = new Size(978, 441);
			this.kryptonDockableWorkspace.TabIndex = 0;
			this.kryptonDockableWorkspace.TabStop = true;
			this.kryptonContextMenuItem_2.Text = "Menu Item";
			this.kryptonContextMenuItem_3.Text = "Menu Item";
			this.kryptonContextMenuHeading_0.ExtraText = "";
			this.kryptonContextMenuItem_4.Items.AddRange(new KryptonContextMenuItemBase[]
			{
				this.kryptonContextMenuCheckButton_0
			});
			this.kryptonContextMenuItem_4.Text = "自动换行";
			this.kryptonContextMenuCheckButton_0.Text = "CheckButton";
			this.kryptonContextMenuItem_5.Text = "Menu Item";
			this.kryptonContextMenuCheckBox_0.ExtraText = "";
			this.kryptonContextMenuItem_6.Text = "Menu Item";
			this.kryptonContextMenuItem_7.Text = "Menu Item";
			this.kryptonContextMenuItems_4.Items.AddRange(new KryptonContextMenuItemBase[]
			{
				this.kryptonContextMenuItem_8
			});
			this.kryptonContextMenuItem_8.Text = "";
			this.folderBrowserDialog_0.RootFolder = Environment.SpecialFolder.MyComputer;
			this.kryptonManager_1.GlobalPaletteMode = PaletteModeManager.Office2007Blue;
			base.AutoScaleDimensions = new SizeF(6f, 12f);
			base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(984, 562);
			base.Controls.Add(this.kryptonPanel);
			base.Controls.Add(this.kryptonRibbon);
			base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.Name = "Editor2";
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "都客编辑器(DKEditor)";
			base.FormClosing += new FormClosingEventHandler(this.Editor2_FormClosing);
			base.FormClosed += new FormClosedEventHandler(this.Editor2_FormClosed);
			base.Load += new EventHandler(this.Editor2_Load);
			((ISupportInitialize)this.kryptonRibbon).EndInit();
			this.contextMenuStrip1.ResumeLayout(false);
			((ISupportInitialize)this.kryptonPanel).EndInit();
			this.kryptonPanel.ResumeLayout(false);
			((ISupportInitialize)this.kryptonDockableWorkspace).EndInit();
			base.ResumeLayout(false);
			base.PerformLayout();
		}

		// Token: 0x0600004B RID: 75 RVA: 0x000085DC File Offset: 0x000067DC
		private void kryptonContextMenuItem_0_Click(object sender, EventArgs e)
		{
			base.Close();
		}

		// Token: 0x06000044 RID: 68 RVA: 0x00008494 File Offset: 0x00006694
		private void kryptonRibbonGroupButton_0_Click(object sender, EventArgs e)
		{
			if (this.openFileDialog_0.ShowDialog(this) == DialogResult.OK)
			{
				this.AddFileToEditor(this.openFileDialog_0.FileName);
			}
		}

		// Token: 0x06000062 RID: 98 RVA: 0x0000922C File Offset: 0x0000742C
		private void kryptonRibbonGroupButton_10_Click(object sender, EventArgs e)
		{
			if (this.method_18() != null)
			{
				this.method_18().Document.UndoRedo.Redo();
			}
		}

		// Token: 0x06000060 RID: 96 RVA: 0x00009194 File Offset: 0x00007394
		private void kryptonRibbonGroupButton_11_Click(object sender, EventArgs e)
		{
			if (this.string_0 != "")
			{
				this.folderBrowserDialog_0.SelectedPath = this.string_0;
			}
			if (this.folderBrowserDialog_0.ShowDialog() == DialogResult.OK)
			{
				MiddleModule.SendMessage(this, new FormInfo
				{
					frmname = "addfolder",
					para = this.folderBrowserDialog_0.SelectedPath
				});
				this.string_0 = this.folderBrowserDialog_0.SelectedPath;
			}
		}

		// Token: 0x06000065 RID: 101 RVA: 0x00009260 File Offset: 0x00007460
		private void kryptonRibbonGroupButton_12_Click(object sender, EventArgs e)
		{
			if (this.kryptonWorkspaceCell_0 != null && this.kryptonWorkspaceCell_0.Pages.Count > 0)
			{
				foreach (KryptonPage current in this.kryptonWorkspaceCell_0.Pages)
				{
					SyntaxEditor syntaxEditor = current.Controls[0] as SyntaxEditor;
					syntaxEditor.Tag = Encoding.UTF8;
					this.method_17(syntaxEditor);
				}
				MessageBox.Show("转换成功！已把所有打开的文件转换成utf-8保存！");
			}
		}

		// Token: 0x06000066 RID: 102 RVA: 0x000092F8 File Offset: 0x000074F8
		private void kryptonRibbonGroupButton_13_Click(object sender, EventArgs e)
		{
			if (this.kryptonWorkspaceCell_0 != null && this.kryptonWorkspaceCell_0.Pages.Count > 0)
			{
				foreach (KryptonPage current in this.kryptonWorkspaceCell_0.Pages)
				{
					SyntaxEditor syntaxEditor = current.Controls[0] as SyntaxEditor;
					syntaxEditor.Tag = Encoding.GetEncoding("gb2312");
					this.method_17(syntaxEditor);
				}
				MessageBox.Show("转换成功！已把所有打开的文件转换成GBK保存！");
			}
		}

		// Token: 0x06000067 RID: 103 RVA: 0x00009394 File Offset: 0x00007594
		private void kryptonRibbonGroupButton_14_Click(object sender, EventArgs e)
		{
			TagsFrmSetting tagsFrmSetting = new TagsFrmSetting();
			if (tagsFrmSetting.ShowDialog() == DialogResult.OK)
			{
				this.kryptonDockingManager_0.RemovePage("tagexploer", true);
				KryptonPage kryptonPage = this.method_3("标签面板");
				kryptonPage.UniqueName = "tagexploer";
				this.kryptonDockingManager_0.AddDockspace("Control", DockingEdge.Left, new KryptonPage[]
				{
					kryptonPage
				}, new KryptonPage[0][]);
				this.Text = "当前标签面板为:" + Comm.CurrentTag;
			}
		}

		// Token: 0x06000068 RID: 104 RVA: 0x00009414 File Offset: 0x00007614
		private void kryptonRibbonGroupButton_15_Click(object sender, EventArgs e)
		{
			TagEditFrm tagEditFrm = new TagEditFrm(true);
			tagEditFrm.ShowDialog();
		}

		// Token: 0x06000069 RID: 105 RVA: 0x00009430 File Offset: 0x00007630
		private void kryptonRibbonGroupButton_16_Click(object sender, EventArgs e)
		{
			TagEditFrm tagEditFrm = new TagEditFrm();
			tagEditFrm.ShowDialog();
		}

		// Token: 0x06000053 RID: 83 RVA: 0x00008A40 File Offset: 0x00006C40
		private void kryptonRibbonGroupButton_1_Click(object sender, EventArgs e)
		{
			this.method_17(this.method_18());
		}

		// Token: 0x06000052 RID: 82 RVA: 0x000089C0 File Offset: 0x00006BC0
		private void kryptonRibbonGroupButton_2_Click(object sender, EventArgs e)
		{
			if (this.kryptonWorkspaceCell_0 != null && this.kryptonWorkspaceCell_0.Pages.Count > 0)
			{
				foreach (KryptonPage current in this.kryptonWorkspaceCell_0.Pages)
				{
					SyntaxEditor syntaxEditor_ = current.Controls[0] as SyntaxEditor;
					this.method_17(syntaxEditor_);
				}
			}
		}

		// Token: 0x06000056 RID: 86 RVA: 0x00008AC0 File Offset: 0x00006CC0
		private void kryptonRibbonGroupButton_3_Click(object sender, EventArgs e)
		{
			if (this.fontDialog_0.ShowDialog(this) == DialogResult.OK && this.kryptonWorkspaceCell_0 != null && this.kryptonWorkspaceCell_0.Pages.Count > 0)
			{
				foreach (KryptonPage current in this.kryptonWorkspaceCell_0.Pages)
				{
					SyntaxEditor syntaxEditor = current.Controls[0] as SyntaxEditor;
					if (syntaxEditor != null)
					{
						syntaxEditor.Font = this.fontDialog_0.Font;
					}
				}
			}
		}

		// Token: 0x06000058 RID: 88 RVA: 0x00008B60 File Offset: 0x00006D60
		private void kryptonRibbonGroupButton_5_Click(object sender, EventArgs e)
		{
		}

		// Token: 0x06000059 RID: 89 RVA: 0x00008B64 File Offset: 0x00006D64
		private void kryptonRibbonGroupButton_6_Click(object sender, EventArgs e)
		{
			if (this.method_18() != null)
			{
				HtmlAgilityPack.HtmlDocument htmlDocument = new HtmlAgilityPack.HtmlDocument();
				htmlDocument.OptionAutoCloseOnEnd = true;
				htmlDocument.LoadHtml(this.method_18().Text);
				string[] array = new string[]
				{
					"img",
					"link",
					"meta",
					"input",
					"br",
					"base",
					"hr",
					"area",
					"basefont",
					"col",
					"embed",
					"frame",
					"param"
				};
				string[] array2 = array;
				for (int i = 0; i < array2.Length; i++)
				{
					string str = array2[i];
					HtmlNodeCollection htmlNodeCollection = htmlDocument.DocumentNode.SelectNodes("//" + str);
					if (htmlNodeCollection != null)
					{
						foreach (HtmlNode current in ((IEnumerable<HtmlNode>)htmlNodeCollection))
						{
							string text = "<" + str + " ";
							foreach (HtmlAttribute current2 in ((IEnumerable<HtmlAttribute>)current.Attributes))
							{
								string text2 = text;
								text = string.Concat(new string[]
								{
									text2,
									" ",
									current2.Name,
									"=\"",
									current2.Value,
									"\""
								});
							}
							text += "/>";
							HtmlNode newChild = htmlDocument.CreateTextNode(text);
							current.ParentNode.InsertBefore(newChild, current);
							current.ParentNode.RemoveChild(current);
						}
					}
				}
				StringBuilder stringBuilder = new StringBuilder();
				StringWriter writer = new StringWriter(stringBuilder);
				htmlDocument.Save(writer);
				this.method_18().Text = stringBuilder.ToString();
				this.method_18().Document.Language.FormatDocument(this.method_18().Document);
			}
		}

		// Token: 0x0600005E RID: 94 RVA: 0x000090DC File Offset: 0x000072DC
		private void kryptonRibbonGroupButton_7_Click(object sender, EventArgs e)
		{
			if (this.findReplaceForm_0 == null)
			{
				this.findReplaceForm_0 = new FindReplaceForm(this.method_18(), this.findReplaceOptions_0);
			}
			this.findReplaceForm_0.Owner = this;
			if (this.findReplaceForm_0.Visible)
			{
				this.findReplaceForm_0.Activate();
				return;
			}
			this.findReplaceForm_0.Show();
		}

		// Token: 0x0600005F RID: 95 RVA: 0x00009138 File Offset: 0x00007338
		private void kryptonRibbonGroupButton_8_Click(object sender, EventArgs e)
		{
			if (this.findReplaceForm_0 == null)
			{
				this.findReplaceForm_0 = new FindReplaceForm(this.method_18(), this.findReplaceOptions_0);
			}
			this.findReplaceForm_0.Owner = this;
			if (this.findReplaceForm_0.Visible)
			{
				this.findReplaceForm_0.Activate();
				return;
			}
			this.findReplaceForm_0.Show();
		}

		// Token: 0x06000061 RID: 97 RVA: 0x0000920C File Offset: 0x0000740C
		private void kryptonRibbonGroupButton_9_Click(object sender, EventArgs e)
		{
			if (this.method_18() != null)
			{
				this.method_18().Document.UndoRedo.Undo();
			}
		}

		// Token: 0x0600003B RID: 59 RVA: 0x0000826C File Offset: 0x0000646C
		private KryptonPage method_0(string string_1, int int_0, Control control_0)
		{
			KryptonPage kryptonPage = new KryptonPage();
			kryptonPage.Text = string_1;
			kryptonPage.TextTitle = string_1;
			kryptonPage.UniqueName = string_1;
			control_0.Dock = DockStyle.Fill;
			kryptonPage.Controls.Add(control_0);
			return kryptonPage;
		}

		// Token: 0x0600003C RID: 60 RVA: 0x000082A8 File Offset: 0x000064A8
		private KryptonPage method_1(string string_1)
		{
			KryptonPage kryptonPage = new KryptonPage();
			kryptonPage.Text = string_1;
			kryptonPage.TextTitle = string_1;
			kryptonPage.UniqueName = string_1;
			kryptonPage.BackColor = Color.Transparent;
			ucFileExploer ucFileExploer = new ucFileExploer();
			ucFileExploer.Dock = DockStyle.Fill;
			ucFileExploer.BackColor = Color.White;
			kryptonPage.Controls.Add(ucFileExploer);
			return kryptonPage;
		}

		// Token: 0x06000047 RID: 71 RVA: 0x000084D8 File Offset: 0x000066D8
		private void method_10(object sender, DockGlobalSavingEventArgs e)
		{
			e.XmlWriter.WriteStartElement("CustomGlobalData");
			e.XmlWriter.WriteAttributeString("SavedTime", DateTime.Now.ToString());
			e.XmlWriter.WriteEndElement();
		}

		// Token: 0x06000048 RID: 72 RVA: 0x00008524 File Offset: 0x00006724
		private void method_11(object sender, DockGlobalLoadingEventArgs e)
		{
			e.XmlReader.Read();
			Console.WriteLine("GlobalConfig was saved at {0}", e.XmlReader.GetAttribute("SavedTime"));
			e.XmlReader.Read();
		}

		// Token: 0x0600004A RID: 74 RVA: 0x000085A8 File Offset: 0x000067A8
		private void method_12(object sender, DockPageLoadingEventArgs e)
		{
			e.XmlReader.Read();
			Console.WriteLine("PageConfig was saved at {0}", e.XmlReader.GetAttribute("SavedMilliseconds"));
			e.XmlReader.Read();
		}

		// Token: 0x0600004D RID: 77 RVA: 0x00008628 File Offset: 0x00006828
		private void method_13(object sender, EventArgs e)
		{
			ButtonSpecAny buttonSpecAny = sender as ButtonSpecAny;
			if (this.kryptonWorkspaceCell_0 != null)
			{
				this.kryptonWorkspaceCell_0.Pages.Remove(buttonSpecAny.Owner as KryptonPage);
			}
			if (this.kryptonWorkspaceCell_0.Pages.Count == 0)
			{
				this.kryptonWorkspaceCell_0 = null;
			}
		}

		// Token: 0x0600004F RID: 79 RVA: 0x000088F8 File Offset: 0x00006AF8
		private void method_14(object sender, UndoRedoStateChangedEventArgs e)
		{
			if (e.EnabledStatesChanged)
			{
				this.kryptonRibbonGroupButton_9.Enabled = e.Document.UndoRedo.CanUndo;
				this.kryptonRibbonGroupButton_10.Enabled = e.Document.UndoRedo.CanRedo;
			}
		}

		// Token: 0x06000050 RID: 80 RVA: 0x00008938 File Offset: 0x00006B38
		private void method_15(object sender, EventArgs e)
		{
		}

		// Token: 0x06000051 RID: 81 RVA: 0x0000893C File Offset: 0x00006B3C
		private void method_16(object object_0, object object_1)
		{
			FormInfo formInfo = object_1 as FormInfo;
			string frmname;
			if (formInfo != null && (frmname = formInfo.frmname) != null)
			{
				if (frmname == "loadfile")
				{
					string path = formInfo.para.ToString();
					this.AddFileToEditor(path);
					return;
				}
				if (!(frmname == "inserttag"))
				{
					return;
				}
				if (this.method_18() != null)
				{
					this.method_18().Focus();
					formInfo.para.ToString();
					this.method_18().SelectedView.PasteFromClipboard();
				}
			}
		}

		// Token: 0x06000054 RID: 84 RVA: 0x00008A50 File Offset: 0x00006C50
		private void method_17(SyntaxEditor syntaxEditor_0)
		{
			if (syntaxEditor_0 != null)
			{
				Encoding encoding = syntaxEditor_0.Tag as Encoding;
				syntaxEditor_0.Document.SaveFile(syntaxEditor_0.Document.Filename, encoding, LineTerminator.Newline);
			}
		}

		// Token: 0x06000055 RID: 85 RVA: 0x00008A84 File Offset: 0x00006C84
		private SyntaxEditor method_18()
		{
			if (this.kryptonWorkspaceCell_0 != null && this.kryptonWorkspaceCell_0.Pages.Count != 0)
			{
				return this.kryptonWorkspaceCell_0.SelectedPage.Controls[0] as SyntaxEditor;
			}
			return null;
		}

		// Token: 0x0600003D RID: 61 RVA: 0x00008300 File Offset: 0x00006500
		private void method_2(object sender, EventArgs e)
		{
			using (FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog())
			{
				folderBrowserDialog.ShowDialog();
			}
		}

		// Token: 0x0600003E RID: 62 RVA: 0x00008338 File Offset: 0x00006538
		private KryptonPage method_3(string string_1)
		{
			KryptonPage kryptonPage = new KryptonPage();
			kryptonPage.Text = string_1;
			kryptonPage.TextTitle = string_1;
			kryptonPage.UniqueName = string_1;
			kryptonPage.BackColor = Color.Transparent;
			ucTagExploer ucTagExploer = new ucTagExploer();
			ucTagExploer.Dock = DockStyle.Fill;
			kryptonPage.Controls.Add(ucTagExploer);
			return kryptonPage;
		}

		// Token: 0x06000040 RID: 64 RVA: 0x00008430 File Offset: 0x00006630
		private void method_4(object sender, EventArgs e)
		{
			this.byte_0 = this.kryptonDockingManager_0.SaveConfigToArray();
		}

		// Token: 0x06000041 RID: 65 RVA: 0x00008444 File Offset: 0x00006644
		private void method_5(object sender, EventArgs e)
		{
			this.byte_1 = this.kryptonDockingManager_0.SaveConfigToArray();
		}

		// Token: 0x06000042 RID: 66 RVA: 0x00008458 File Offset: 0x00006658
		private void method_6(object sender, EventArgs e)
		{
			this.byte_2 = this.kryptonDockingManager_0.SaveConfigToArray();
		}

		// Token: 0x06000043 RID: 67 RVA: 0x0000846C File Offset: 0x0000666C
		private void method_7(object sender, EventArgs e)
		{
			if (this.saveFileDialog_0.ShowDialog(this) == DialogResult.OK)
			{
				this.kryptonDockingManager_0.SaveConfigToFile(this.saveFileDialog_0.FileName);
			}
		}

		// Token: 0x06000045 RID: 69 RVA: 0x000084B8 File Offset: 0x000066B8
		private void method_8(object sender, EventArgs e)
		{
			this.kryptonDockingManager_0.HideAllPages();
		}

		// Token: 0x06000046 RID: 70 RVA: 0x000084C8 File Offset: 0x000066C8
		private void method_9(object sender, EventArgs e)
		{
			this.kryptonDockingManager_0.ShowAllPages();
		}

		// Token: 0x06000057 RID: 87 RVA: 0x00008B5C File Offset: 0x00006D5C
		private void PbSaofvZj0(object sender, EventArgs e)
		{
		}

		// Token: 0x0600005D RID: 93 RVA: 0x00008FCC File Offset: 0x000071CC
		private void 代码折叠ToolStripMenuItem_Click(object sender, EventArgs e)
		{
			SyntaxEditor syntaxEditor = this.method_18();
			if (syntaxEditor != null && syntaxEditor.Document.Filename != null)
			{
				bool flag = true;
				if (syntaxEditor.Document.Outlining.RootNode.Count > 0)
				{
					flag = syntaxEditor.Document.Outlining.RootNode[0].Expanded;
				}
				OutliningNode outliningNode = syntaxEditor.Document.Outlining.RootNode.FindNodeRecursive(syntaxEditor.Caret.Offset);
				if (outliningNode != null)
				{
					flag = outliningNode.Expanded;
				}
				else if (syntaxEditor.Caret.Offset > 0)
				{
					outliningNode = syntaxEditor.Document.Outlining.RootNode.FindNodeRecursive(syntaxEditor.Caret.Offset - 1);
					if (outliningNode != null)
					{
						flag = outliningNode.Expanded;
					}
				}
				if (flag)
				{
					syntaxEditor.Document.Outlining.RootNode.CollapseDescendants();
				}
				else
				{
					syntaxEditor.Document.Outlining.RootNode.ExpandDescendants();
				}
				this.代码折叠ToolStripMenuItem.Checked = !this.代码折叠ToolStripMenuItem.Checked;
			}
		}

		// Token: 0x04000071 RID: 113
		private KryptonContextMenuItem aMnarujUlO;

		// Token: 0x040000B0 RID: 176
		private byte[] byte_0;

		// Token: 0x040000B1 RID: 177
		private byte[] byte_1;

		// Token: 0x040000B2 RID: 178
		private byte[] byte_2;

		// Token: 0x0400009C RID: 156
		private ToolStripMenuItem cmenu_optionItem_autowrap;

		// Token: 0x0400009E RID: 158
		private ToolStripMenuItem cmenu_optionItem_RowHighlighter;

		// Token: 0x0400009D RID: 157
		private ToolStripMenuItem cmenu_optionItem_ShowLineNumber;

		// Token: 0x0400009B RID: 155
		private ContextMenuStrip contextMenuStrip1;

		// Token: 0x040000B4 RID: 180
		private FindReplaceForm findReplaceForm_0;

		// Token: 0x040000B5 RID: 181
		private FindReplaceOptions findReplaceOptions_0;

		// Token: 0x04000094 RID: 148
		private FolderBrowserDialog folderBrowserDialog_0;

		// Token: 0x0400009A RID: 154
		private FontDialog fontDialog_0;

		// Token: 0x04000066 RID: 102
		private IContainer icontainer_0;

		// Token: 0x04000068 RID: 104
		private ImageList imageList_0;

		// Token: 0x040000AF RID: 175
		private int KpgFralFoe;

		// Token: 0x04000086 RID: 134
		private KryptonContextMenuCheckBox kryptonContextMenuCheckBox_0;

		// Token: 0x04000084 RID: 132
		private KryptonContextMenuCheckButton kryptonContextMenuCheckButton_0;

		// Token: 0x04000088 RID: 136
		private KryptonContextMenuCheckButton kryptonContextMenuCheckButton_1;

		// Token: 0x04000089 RID: 137
		private KryptonContextMenuCheckButton kryptonContextMenuCheckButton_2;

		// Token: 0x0400008A RID: 138
		private KryptonContextMenuCheckButton kryptonContextMenuCheckButton_3;

		// Token: 0x0400007C RID: 124
		private KryptonContextMenuHeading kryptonContextMenuHeading_0;

		// Token: 0x04000090 RID: 144
		private KryptonContextMenuHeading kryptonContextMenuHeading_1;

		// Token: 0x04000079 RID: 121
		private KryptonContextMenuItems kryptonContextMenuItems_0;

		// Token: 0x04000082 RID: 130
		private KryptonContextMenuItems kryptonContextMenuItems_1;

		// Token: 0x0400008B RID: 139
		private KryptonContextMenuItems kryptonContextMenuItems_2;

		// Token: 0x0400008C RID: 140
		private KryptonContextMenuItems kryptonContextMenuItems_3;

		// Token: 0x0400008E RID: 142
		private KryptonContextMenuItems kryptonContextMenuItems_4;

		// Token: 0x04000091 RID: 145
		private KryptonContextMenuItems kryptonContextMenuItems_5;

		// Token: 0x04000070 RID: 112
		private KryptonContextMenuItem kryptonContextMenuItem_0;

		// Token: 0x04000072 RID: 114
		private KryptonContextMenuItem kryptonContextMenuItem_1;

		// Token: 0x04000093 RID: 147
		private KryptonContextMenuItem kryptonContextMenuItem_10;

		// Token: 0x0400007A RID: 122
		private KryptonContextMenuItem kryptonContextMenuItem_2;

		// Token: 0x0400007B RID: 123
		private KryptonContextMenuItem kryptonContextMenuItem_3;

		// Token: 0x04000083 RID: 131
		private KryptonContextMenuItem kryptonContextMenuItem_4;

		// Token: 0x04000085 RID: 133
		private KryptonContextMenuItem kryptonContextMenuItem_5;

		// Token: 0x04000087 RID: 135
		private KryptonContextMenuItem kryptonContextMenuItem_6;

		// Token: 0x0400008D RID: 141
		private KryptonContextMenuItem kryptonContextMenuItem_7;

		// Token: 0x0400008F RID: 143
		private KryptonContextMenuItem kryptonContextMenuItem_8;

		// Token: 0x04000092 RID: 146
		private KryptonContextMenuItem kryptonContextMenuItem_9;

		// Token: 0x04000081 RID: 129
		private KryptonContextMenu kryptonContextMenu_0;

		// Token: 0x04000077 RID: 119
		private KryptonDockableWorkspace kryptonDockableWorkspace;

		// Token: 0x04000067 RID: 103
		private KryptonDockingManager kryptonDockingManager_0;

		// Token: 0x04000075 RID: 117
		private KryptonManager kryptonManager_0;

		// Token: 0x040000A5 RID: 165
		private KryptonManager kryptonManager_1;

		// Token: 0x04000076 RID: 118
		private KryptonPanel kryptonPanel;

		// Token: 0x04000069 RID: 105
		private KryptonRibbon kryptonRibbon;

		// Token: 0x0400006D RID: 109
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_0;

		// Token: 0x04000078 RID: 120
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_1;

		// Token: 0x040000A3 RID: 163
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_10;

		// Token: 0x040000A4 RID: 164
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_11;

		// Token: 0x040000A8 RID: 168
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_12;

		// Token: 0x040000A9 RID: 169
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_13;

		// Token: 0x040000AC RID: 172
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_14;

		// Token: 0x040000AD RID: 173
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_15;

		// Token: 0x040000AE RID: 174
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_16;

		// Token: 0x0400007D RID: 125
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_2;

		// Token: 0x0400007E RID: 126
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_3;

		// Token: 0x0400007F RID: 127
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_4;

		// Token: 0x04000080 RID: 128
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_5;

		// Token: 0x04000097 RID: 151
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_6;

		// Token: 0x04000098 RID: 152
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_7;

		// Token: 0x04000099 RID: 153
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_8;

		// Token: 0x040000A2 RID: 162
		private KryptonRibbonGroupButton kryptonRibbonGroupButton_9;

		// Token: 0x040000AA RID: 170
		private KryptonRibbonGroupSeparator kryptonRibbonGroupSeparator_0;

		// Token: 0x0400006C RID: 108
		private KryptonRibbonGroupTriple kryptonRibbonGroupTriple_0;

		// Token: 0x0400006F RID: 111
		private KryptonRibbonGroupTriple kryptonRibbonGroupTriple_1;

		// Token: 0x04000096 RID: 150
		private KryptonRibbonGroupTriple kryptonRibbonGroupTriple_2;

		// Token: 0x040000A1 RID: 161
		private KryptonRibbonGroupTriple kryptonRibbonGroupTriple_3;

		// Token: 0x040000A7 RID: 167
		private KryptonRibbonGroupTriple kryptonRibbonGroupTriple_4;

		// Token: 0x040000AB RID: 171
		private KryptonRibbonGroupTriple kryptonRibbonGroupTriple_5;

		// Token: 0x0400006B RID: 107
		private KryptonRibbonGroup kryptonRibbonGroup_0;

		// Token: 0x0400006E RID: 110
		private KryptonRibbonGroup kryptonRibbonGroup_1;

		// Token: 0x04000095 RID: 149
		private KryptonRibbonGroup kryptonRibbonGroup_2;

		// Token: 0x040000A0 RID: 160
		private KryptonRibbonGroup kryptonRibbonGroup_3;

		// Token: 0x040000A6 RID: 166
		private KryptonRibbonGroup kryptonRibbonGroup_4;

		// Token: 0x0400006A RID: 106
		private KryptonRibbonTab kryptonRibbonTab_0;

		// Token: 0x040000B3 RID: 179
		private KryptonWorkspaceCell kryptonWorkspaceCell_0;

		// Token: 0x04000073 RID: 115
		private OpenFileDialog openFileDialog_0;

		// Token: 0x04000074 RID: 116
		private SaveFileDialog saveFileDialog_0;

		// Token: 0x040000B6 RID: 182
		private string string_0;

		// Token: 0x0400009F RID: 159
		private ToolStripMenuItem 代码折叠ToolStripMenuItem;
	}
}
